package com.feige.auth.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.collections.MapUtils;

import java.util.Map;

/**
 * @author feige<br />
 * @ClassName: LoginUser <br/>
 * @Description: <br/>
 * @date: 2022/12/8 22:53<br/>
 */
@Data
@NoArgsConstructor
public class LoginUser implements IUser {

    private static final long serialVersionUID = -7257711041205528245L;
    private Long id;
    private String loginName;
    private Long userId;

    public LoginUser(Map<String, Object> m) {
        this.id = MapUtils.getLong(m, ID);
        this.loginName = MapUtils.getString(m, LOGIN_NAME);
        this.userId = MapUtils.getLong(m, USER_ID);
    }
}
